package com.metier;

import java.io.Serializable;


public abstract class BaseContactTempPK implements Serializable {

	protected int hashCode = Integer.MIN_VALUE;

	private com.metier.Utilisateur idUser2;
	private com.metier.Utilisateur idUser1;


	public BaseContactTempPK () {}
	
	public BaseContactTempPK (
		com.metier.Utilisateur idUser2,
		com.metier.Utilisateur idUser1) {

		this.setIdUser2(idUser2);
		this.setIdUser1(idUser1);
	}


	/**
	 * Return the value associated with the column: id_user2
	 */
	public com.metier.Utilisateur getIdUser2 () {
		return idUser2;
	}

	/**
	 * Set the value related to the column: id_user2
	 * @param idUser2 the id_user2 value
	 */
	public void setIdUser2 (com.metier.Utilisateur idUser2) {
		this.idUser2 = idUser2;
	}



	/**
	 * Return the value associated with the column: id_user1
	 */
	public com.metier.Utilisateur getIdUser1 () {
		return idUser1;
	}

	/**
	 * Set the value related to the column: id_user1
	 * @param idUser1 the id_user1 value
	 */
	public void setIdUser1 (com.metier.Utilisateur idUser1) {
		this.idUser1 = idUser1;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.metier.ContactTempPK)) return false;
		else {
			com.metier.ContactTempPK mObj = (com.metier.ContactTempPK) obj;
			if (null != this.getIdUser2() && null != mObj.getIdUser2()) {
				if (!this.getIdUser2().equals(mObj.getIdUser2())) {
					return false;
				}
			}
			else {
				return false;
			}
			if (null != this.getIdUser1() && null != mObj.getIdUser1()) {
				if (!this.getIdUser1().equals(mObj.getIdUser1())) {
					return false;
				}
			}
			else {
				return false;
			}
			return true;
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			StringBuilder sb = new StringBuilder();
			if (null != this.getIdUser2()) {
				sb.append(this.getIdUser2().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			if (null != this.getIdUser1()) {
				sb.append(this.getIdUser1().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			this.hashCode = sb.toString().hashCode();
		}
		return this.hashCode;
	}


}